<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/10/12
  Time: 11:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>account</title>
    <link type="text/css" rel="stylesheet" media="all" href="<%=request.getContextPath()%>/styles/global.css"/>
    <link type="text/css" rel="stylesheet" media="all" href="<%=request.getContextPath()%>/styles/global_color.css"/>
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <script language="javascript" type="text/javascript">
        //保存成功的提示信息
        function showResult() {
            showResultDiv(true);
            window.setTimeout("showResultDiv(false);", 3000);
        }

        function showResultDiv(flag) {
            var divResult = document.getElementById("save_result_info");
            if (flag)
                divResult.style.display = "block";
            else
                divResult.style.display = "none";
        }

        //显示修改密码的信息项
        function showPwd(chkObj) {
            if (chkObj.checked)
                document.getElementById("divPwds").style.display = "block";
            else
                document.getElementById("divPwds").style.display = "none";
        }
    </script>
</head>
<body>
<!--Logo区域开始-->
<div id="header">
    <img src="../images/logo.png" alt="logo" class="left"/>
    <a href="<%=request.getContextPath()%>/admins/exit">[退出]</a>
</div>
<!--Logo区域结束-->
<!--导航区域开始-->
<div id="navi">
    <c:import url="../navigation.jsp"/>
    <script>
        var li = document.getElementById("menu").children;
        var title = document.getElementsByTagName('title')[0].textContent;
        for (let i = 0; i < li.length; i++) {
            if (li[i].children[0].className.startsWith(title)){
                li[i].children[0].className = title + '_on';
            }
        }
    </script>
</div>
<!--导航区域结束-->
<!--主要区域开始-->
<div id="main">
    <!--保存成功或者失败的提示消息-->
    <div id="save_result_info" class="save_fail">保存失败，旧密码错误！</div>
    <form action="<%=request.getContextPath()%>/account.modifyInfo" method="post" class="main_form">
        <!--必填项-->
        <div class="text_info clearfix"><span>账务账号ID：</span></div>
        <div class="input_info">
            <input type="text" name="accountId" value="${account.accountId}" readonly class="readonly"/>
        </div>
        <div class="text_info clearfix"><span>姓名：</span></div>
        <div class="input_info">
            <input type="text" value="${account.realName}" name="realName"/>
            <span class="required">*</span>
            <div class="validate_msg_long">${result.getFieldError("realName").defaultMessage}</div>
        </div>
        <div class="text_info clearfix"><span>身份证：</span></div>
        <div class="input_info">
            <input type="text" value="${account.idcardNo}" name="idcardNo" readonly class="readonly"/>
        </div>
        <div class="text_info clearfix"><span>登录账号：</span></div>
        <div class="input_info">
            <input type="text" value="${account.loginName}" name="loginName" readonly class="readonly"/>
        </div>
        <div class="text_info clearfix"><span>电话：</span></div>
        <div class="input_info">
            <input type="text" class="width200" value="${account.telephone}" name="telephone"/>
            <span class="required">*</span>
            <div class="validate_msg_long">${result.getFieldError("telephone").defaultMessage}</div>
        </div>
        <input value="${account.loginPasswd}" name="loginPasswd" type="hidden">
        <%--<div class="text_info clearfix"><span>推荐人身份证号码：</span></div>--%>
        <%--<div class="input_info">--%>
        <%--<input type="text"/>--%>
        <%--<div class="validate_msg_long error_msgs">正确的身份证号码格式</div>--%>
        <%--</div>--%>
        <div class="text_info clearfix"><span>生日：</span></div>
        <div class="input_info">
            <input type="text" value="${account.birthdate}" name="birthdate" readonly class="readonly"/>
        </div>
        <div class="text_info clearfix"><span>Email：</span></div>
        <div class="input_info">
            <input type="text" class="width200" name="email" value="${account.email}"/>
            <div class="validate_msg_long">${result.getFieldError("email").defaultMessage}</div>
        </div>
        <div class="text_info clearfix"><span>职业：</span></div>
        <div class="input_info">
            <input value="${account.occupation}" name="occupation">
        </div>
        <div class="text_info clearfix"><span>性别：</span></div>
        <div class="input_info fee_type">
            <c:if test="${account.gender.equals('女')}">
                <input type="radio" name="gender" checked="checked" id="female" value="女" onclick="feeTypeChange(1);"/>
                <label for="female">女</label>
                <input type="radio" name="gender" id="male" value="男" onclick="feeTypeChange(2);"/>
                <label for="male">男</label>
            </c:if>
            <c:if test="${account.gender.equals('男')}">
                <input type="radio" name="gender" id="female" value="女" onclick="feeTypeChange(1);"/>
                <label for="female">女</label>
                <input type="radio" name="gender" checked="checked" value="男" id="male" onclick="feeTypeChange(2);"/>
                <label for="male">男</label>
            </c:if>
        </div>
        <div class="text_info clearfix"><span>通信地址：</span></div>
        <div class="input_info">
            <input type="text" class="width350" name="mailaddress" value="${account.mailaddress}"/>
            <div class="validate_msg_long">${result.getFieldError("mailaddress").defaultMessage}</div>
        </div>
        <div class="text_info clearfix"><span>邮编：</span></div>
        <div class="input_info">
            <input type="text" value="${account.zipcode}" name="zipcode"/>
            <div class="validate_msg_long">${result.getFieldError("zipcode").defaultMessage}</div>
        </div>
        <div class="text_info clearfix"><span>QQ：</span></div>
        <div class="input_info">
            <input type="text" value="${account.qq}" name="qq"/>
            <div class="validate_msg_long">${result.getFieldError("qq").defaultMessage}</div>
        </div>
        <!--操作按钮-->
        <div class="button_info clearfix">
            <input type="submit" value="保存" class="btn_save"/>
            <input type="reset" value="重置" class="btn_save"/>
            <input type="button" value="取消" class="btn_save" onclick="location.href='/account.page?page=0';"/>
        </div>
    </form>
</div>
<!--主要区域结束-->
<div id="footer">
    <span>[源自北美的技术，最优秀的师资，最真实的企业环境，最适用的实战项目]</span>
    <br/>
    <span>版权所有(C)云科技有限公司 </span>
</div>
</body>
</html>
